package org.jeecg.modules.demo.hd.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.jeecg.modules.demo.hd.entity.AppProject;
import org.jeecg.modules.demo.hd.mapper.AppProjectMapper;
import org.jeecg.modules.demo.hd.service.IAppProjectService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: app_project
 * @Author: jeecg-boot
 * @Date: 2025-04-13
 * @Version: V1.0
 */
@Service
public class AppProjectServiceImpl extends ServiceImpl<AppProjectMapper, AppProject> implements IAppProjectService {

    @Override
    public AppProject getProjectById(String id) {

        LambdaQueryWrapper<AppProject> queryWrapper = Wrappers.lambdaQuery();
        queryWrapper.eq(AppProject::getId, id);
        List<AppProject> dataList = this.baseMapper.selectList(queryWrapper);
        if (dataList != null && dataList.size() > 0) {
            return dataList.get(0);
        }
        return null;
    }
}
